-- GENERATED SPELL FOR [Jaedenar Warlock] --


function spell0_7120(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7120', 3000, 1)
end

function spell1_7120(pUnit, Event) --@Summon Imp,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(11939,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_7120', 1, 1)
end

function spell2_7120(pUnit, Event) --@Unholy Frenzy,n/a--
pUnit:FullCastSpellOnTarget(8699,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7120', 20000, 1)
end

function Sorts_7120(pUnit, Event)
local choix_sorts_7120 = math.random(0, 2)
if choix_sorts_7120 == 0 then
pUnit:RegisterEvent('spell0_7120', 1, 1)
end
if choix_sorts_7120 == 1 then
pUnit:RegisterEvent('spell1_7120', 1, 1)
end
if choix_sorts_7120 == 2 then
pUnit:RegisterEvent('spell2_7120', 1, 1)
end
end

function mob7120_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7120', math.random(1500, 3000), 1)
end

function mob7120_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7120_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7120_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7120, 1, 'mob7120_Action')
RegisterUnitEvent(7120, 2, 'mob7120_Leave')
RegisterUnitEvent(7120, 3, 'mob7120_Kill')
RegisterUnitEvent(7120, 4, 'mob7120_Die')
